<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<body>
	<ui:composition>

		<h:panelGrid>
			<p:fieldset>
				<p:commandLink action="timeTable?faces-redirect=true" immediate="true">Timetable</p:commandLink>
			</p:fieldset>
			<p:fieldset rendered="#{userBean.getRole() != 'DEFAULT' }">
				<h:panelGrid>
					<p:commandLink action="buyTicket?faces-redirect=true" immediate="true">Buy ticket</p:commandLink>
					<p:commandLink action="myTickets?faces-redirect=true" immediate="true">My tickets</p:commandLink>
				</h:panelGrid>
			</p:fieldset>
			<p:fieldset rendered="#{userBean.getRole() == 'EMPLOYEE' }">
				<h:panelGrid>
					<p:commandLink action="userTable?faces-redirect=true" immediate="true">Users</p:commandLink>
					<p:commandLink action="stationTable?faces-redirect=true" immediate="true">Stations</p:commandLink>
					<p:commandLink action="trainTable?faces-redirect=true" immediate="true">Trains</p:commandLink>
				</h:panelGrid>
			</p:fieldset>
		</h:panelGrid>


	</ui:composition>
</body>
</html>


